<?php


namespace Protocols;


class Hex
{
    public static function input($buffer)
    {
        $pos = strpos($buffer,"\n");
        if($pos ===false)
        {
            return 0;
        }
        return $pos+1;
    }

    public static function encode($buffer)
    {
        return $buffer;
    }

    public static function decode($buffer)
    {
        return trim($buffer,"~");
    }

}

